USE [TrioJFLApp]
GO

/****** Object:  Table [dbo].[SAP_ItemMaster] I have a new table for this issues Script Date: 09/26/2018 15:28:55 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SAP_ItemMaster](
	[Oid] [uniqueidentifier] NOT NULL,
	[Plant] [nvarchar](50) NULL,
	[Material_Number] [nvarchar](50) NULL,
	[Material_Description] [nvarchar](50) NULL,
	[Flag_1] [nvarchar](50) NULL,
	[Unit_Issue] [nvarchar](50) NULL,
	[Currency] [nvarchar](50) NULL,
	[Price] [decimal](18, 3) NULL,
	[Flag_2] [nvarchar](50) NULL,
	[MaterialGroup] [nvarchar](50) NULL,
	[LastChange] [datetime] NULL,
	[PurchasingGroup] [nvarchar](50) NULL,
	[ABC] [nvarchar](50) NULL,
	[MRP_Type] [nvarchar](50) NULL,
	[Procurement_Type] [nvarchar](50) NULL,
	[ValCl] [nvarchar](50) NULL,
	[PriceControl] [nvarchar](50) NULL,
	[CreatedBy] [nvarchar](50) NULL,
	[ValuationType] [nvarchar](50) NULL,
	[CreateDate] [datetime] NULL,
	[Special_Procurement_Type] [nvarchar](50) NULL,
	[MRP_Controller] [nvarchar](50) NULL,
	[Planned_Delivery_Days] [nvarchar](50) NULL,
	[Monetary_Unit] [nvarchar](50) NULL,
	[Purchasing_Cost] [decimal](18, 3) NULL,
	[Backflush] [char](1) NULL,
	[GR_Processing_Time] [nvarchar](50) NULL,
	[Reorder_Point] [nvarchar](50) NULL,
	[Lot_Size] [nvarchar](50) NULL,
	[Maximum_Stock_Level] [nvarchar](50) NULL,
	[Safety_Stock] [nvarchar](50) NULL,
	[Minimum_Lot_Size] [nvarchar](50) NULL,
	[Strategy_Group] [nvarchar](50) NULL,
	[Individual_Collective_Requ] [nchar](10) NULL,
	[Scheduling_Margin] [nvarchar](50) NULL,
	[Indicator_Backflush] [nvarchar](50) NULL,
	[In_House_Production_Time] [nvarchar](50) NULL,
	[Profit_Center] [nvarchar](50) NULL,
	[InspectionFlag] [nvarchar](50) NULL,
	[Serial_Number] [nchar](10) NULL,
	[PE_User] [nvarchar](20) NULL,
	[PE_Date] [datetime] NULL,
	[PL_User] [nvarchar](20) NULL,
	[PL_Date] [datetime] NULL,
	[PO_User] [nvarchar](20) NULL,
	[PO_Date] [datetime] NULL,
	[GC_User] [nvarchar](20) NULL,
	[GC_Date] [datetime] NULL,
	[TMP] [nvarchar](20) NULL,
	[MRP_Type_PL] [nvarchar](20) NULL,
	[MRP_Controller_PL] [nvarchar](20) NULL,
	[Strategy_Group_PL] [nvarchar](20) NULL,
	[Extending_Status] [nvarchar](20) NULL,
	[SAP_Upload_Status] [nvarchar](20) NULL,
	[IntoSAP_Date] [datetime] NULL,
	[IntoSAP_User] [nvarchar](20) NULL,
	[PE_LastChg_Date] [datetime] NULL,
	[PE_LastChg_User] [nvarchar](20) NULL,
	[PO_LastChg_Date] [datetime] NULL,
	[PO_LastChg_User] [nvarchar](20) NULL,
	[ActiveStatus] [nvarchar](20) NULL,
	[Del_Date] [datetime] NULL,
	[ProductHierarchy] [nvarchar](50) NULL,
	[IntoSAP_User2] [nvarchar](50) NULL,
	[IntoSAP_Date2] [datetime] NULL,
	[Owner] [nvarchar](50) NULL,
	[Plant_sp_matl_status] [nvarchar](20) NULL,
	[RoutingStatus] [nvarchar](20) NULL,
	[BOMStatus] [nvarchar](20) NULL,
	[Procurement_Type_inSAP] [nvarchar](20) NULL,
	[V_PLANT] [nvarchar](2) NULL,
	[V_SO] [nvarchar](2) NULL,
	[V_FIN] [nvarchar](20) NULL,
	[V_MRP] [nvarchar](2) NULL,
	[V_PO] [nvarchar](2) NULL,
	[V_BASIC_VIEW] [nvarchar](20) NULL,
	[V_SALES] [nvarchar](20) NULL,
	[V_PURCHASING] [nvarchar](20) NULL,
	[V_WORK_SCHEDULING] [nvarchar](20) NULL,
	[V_QUALITY_MANAGEMENT] [nvarchar](20) NULL,
	[V_ACCOUNTING] [nvarchar](20) NULL,
	[V_COST_PRICE] [nvarchar](20) NULL,
	[V_MATERIAL_PLANT_STATUS] [nvarchar](20) NULL,
	[V_PROCUREMENT_TYPE] [nvarchar](20) NULL,
	[V_PLANT_STORAGE_LOC] [nvarchar](20) NULL,
	[LaborHour] [decimal](12, 2) NULL,
	[V_COSTING] [nvarchar](20) NULL,
	[Individual_Collective_Requ_PL] [nvarchar](2) NULL,
	[AI_Flag] [nvarchar](20) NULL,
	[S_PRODUCT_HIERARCHY] [nvarchar](50) NULL,
	[S_IN_HOUSE_TIME] [nvarchar](50) NULL,
	[S_PLAN_DEL_TIME] [nvarchar](50) NULL,
	[S_MRP_TYPE] [nvarchar](50) NULL,
	[S_STRATEGY_GROUP] [nvarchar](50) NULL,
	[S_BOM_EXIT] [nvarchar](50) NULL,
	[S_ROUTING_EXIT] [nvarchar](20) NULL,
	[Remark] [nvarchar](200) NULL,
	[PurchasingGroup_PL] [nvarchar](20) NULL,
	[GC_P_User] [nvarchar](20) NULL,
	[GC_P_Date] [datetime] NULL,
	[GY_Hours] [nvarchar](50) NULL,
	[CG_Hours] [nvarchar](50) NULL,
	[Total_Hours] [nvarchar](50) NULL,
	[LogStatus] [nvarchar](100) NULL,
	[T4SStatus] [nvarchar](50) NULL,
	[MassGroup] [nvarchar](200) NULL,
	[CN_Description] [nvarchar](40) NULL,
	[P_Local] [nvarchar](100) NULL,
	[P_SAP] [nvarchar](100) NULL,
	[IsMissPOview] [nvarchar](20) NULL,
	[PurchasingCategory] [nvarchar](20) NULL,
	[ProcuremntOwner] [nvarchar](20) NULL,
	[ProcurementOwner] [nvarchar](20) NULL,
	[LastMactchTime] [datetime] NULL,
	[LastUploadTime] [datetime] NULL,
	[NeedToSynch] [nvarchar](2) NULL,
	[OriginaltSAP_ProcurementType] [nvarchar](2) NULL,
	[OriginaltSAP_DateTime] [datetime] NULL,
	[LogStatus_Time] [nvarchar](500) NULL,
	[SendToPODate] [datetime] NULL,
	[SendToPOFlag] [nvarchar](2) NULL,
	[ProdOrderStatus] [nvarchar](20) NULL,
	[ProdOrderDate] [datetime] NULL,
	[BOMAndRoutingStatus] [nvarchar](20) NULL,
	[BOMAndRoutingDate] [datetime] NULL,
	[BOMAndRoutingUser] [nvarchar](20) NULL,
	[PCN_NO] [nvarchar](50) NULL,
	[GC_PCN_User] [nvarchar](20) NULL,
	[GC_PCN_Date] [datetime] NULL,
	[SpecialFlag] [nvarchar](2) NULL,
	[PE_ReChange] [int] NULL,
	[PE_ReChangeDate] [datetime] NULL,
 CONSTRAINT [PK_SAP_ItemCode] PRIMARY KEY CLUSTERED 
(
	[Oid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[SAP_ItemMaster] ADD  CONSTRAINT [DF__SAP_ItemM__ProdO__314CB51B]  DEFAULT (N'-') FOR [ProdOrderStatus]
GO


